/**
 * Models.java
 *
 * Copyright (c) 2009 prjmanager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of prjmanager .
 **/

package ro.prjmanager.model;


import javax.persistence.*;

/**
 * This class from the domain model is mapping the table models
 * @author Viorel Tacliciu
 * @version 0.0.1
 */

@Table(name="MODELS")
@Entity
@PrimaryKeyJoinColumn(name = "ID")
public class  Models extends TableSet{


    //this attribute maps an bidirectional association
    //it means that OWNER_TABLE from table columns is a foreign key to ID
    private java.util.List<Columns> columns;
    //this attribute maps an bidirectional association
    //it means that FK_MODEL from table component_generator is a foreign key to ID
    private java.util.List<CustomComponents> fkModelComponentGenerator;
    //this attribute maps the column DATABASE_NAME
    private  java.lang.String  databaseName;
    //this attribute maps the column JAVA_NAME
    private  java.lang.String  javaName;

    //this attribute maps the column IS_EXTEND
    private  java.lang.Integer  isExtend;
    //this attribute maps the column DATABASE_PK
    private  java.lang.String  databasePk;
    //this attribute maps the column PK_CLASS
    private  java.lang.String  pkClass;
    //this attribute maps the column UNIDIRECTIONAL_ASSOCIATION
    private  java.lang.Integer  unidirectionalAssociation;
    //this attribute maps the column CLASS_EXTEND
    private  java.lang.String  classExtend;
    //end mapping columns

    //define getters and setters with coresponding ejb3 annotation, depending of the type
    //of the relation for the column

   
    /**
     * This method maps an OneToMany relation between this table and
     * Columns table
     * @return - an list of Columns objects
     **/
    @OneToMany(cascade=CascadeType.ALL)
    @JoinColumn(name = "OWNER_TABLE",referencedColumnName = "ID")
    public java.util.List<Columns> getColumns(){
        return this.columns;
    }

    /**
     * This method sets the field ownerTableColumns of this entity
     * @param columns - an list of Columns objects
     **/
    public void setColumns(java.util.List<Columns> columns){
        this.columns=columns;
    }
    /**
     * This method maps an OneToMany relation between this table and
     * ComponentGenerator table
     * @return - an list of ComponentGenerator objects
     **/
    @OneToMany(cascade=CascadeType.REFRESH)
    @JoinColumn(name = "FK_MODEL",referencedColumnName = "ID")
    public java.util.List<CustomComponents> getFkModelComponentGenerator(){
        return this.fkModelComponentGenerator;
    }

    /**
     * This method sets the field fkModelComponentGenerator of this entity
     * @param fkModelComponentGenerator - an list of ComponentGenerator objects
     **/
    public void setFkModelComponentGenerator(java.util.List<CustomComponents> fkModelComponentGenerator){
        this.fkModelComponentGenerator=fkModelComponentGenerator;
    }
    /**
     * This method gets the databaseName attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "DATABASE_NAME")
    public  java.lang.String  getDatabaseName(){
        return this.databaseName;
    }

    /**
     * The setter for DATABASE_NAME column
     * @param databaseName -  an  java.lang.String  object
     **/
    public void setDatabaseName( java.lang.String  databaseName){
        this.databaseName=databaseName;
    }
    /**
     * This method gets the javaName attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "JAVA_NAME")
    public  java.lang.String  getJavaName(){
        return this.javaName;
    }

    /**
     * The setter for JAVA_NAME column
     * @param javaName -  an  java.lang.String  object
     **/
    public void setJavaName( java.lang.String  javaName){
        this.javaName=javaName;
    }

    /**
     * This method gets the isExtend attribute
     * @return - an  java.lang.Integer  object
     **/
    @Column(name = "IS_EXTEND")
    public  java.lang.Integer  getIsExtend(){
        return this.isExtend;
    }

    /**
     * The setter for IS_EXTEND column
     * @param isExtend -  an  java.lang.Integer  object
     **/
    public void setIsExtend( java.lang.Integer  isExtend){
        this.isExtend=isExtend;
    }
    /**
     * This method gets the databasePk attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "DATABASE_PK")
    public  java.lang.String  getDatabasePk(){
        return this.databasePk;
    }

    /**
     * The setter for DATABASE_PK column
     * @param databasePk -  an  java.lang.String  object
     **/
    public void setDatabasePk( java.lang.String  databasePk){
        this.databasePk=databasePk;
    }
    /**
     * This method gets the pkClass attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "PK_CLASS")
    public  java.lang.String  getPkClass(){
        return this.pkClass;
    }

    /**
     * The setter for PK_CLASS column
     * @param pkClass -  an  java.lang.String  object
     **/
    public void setPkClass( java.lang.String  pkClass){
        this.pkClass=pkClass;
    }
    /**
     * This method gets the unidirectionalAssociation attribute
     * @return - an  java.lang.Integer  object
     **/
    @Column(name = "UNIDIRECTIONAL_ASSOCIATION")
    public  java.lang.Integer  getUnidirectionalAssociation(){
        return this.unidirectionalAssociation;
    }

    /**
     * The setter for UNIDIRECTIONAL_ASSOCIATION column
     * @param unidirectionalAssociation -  an  java.lang.Integer  object
     **/
    public void setUnidirectionalAssociation( java.lang.Integer  unidirectionalAssociation){
        this.unidirectionalAssociation=unidirectionalAssociation;
    }
    /**
     * This method gets the classExtend attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "CLASS_EXTEND")
    public  java.lang.String  getClassExtend(){
        return this.classExtend;
    }

    /**
     * The setter for CLASS_EXTEND column
     * @param classExtend -  an  java.lang.String  object
     **/
    public void setClassExtend( java.lang.String  classExtend){
        this.classExtend=classExtend;
    }
}



